//
//  NSUserDefaults+SDExtension.m
//  SuperDoctor
//
//  Created by 李忠 on 7/6/16.
//  Copyright © 2016 SD. All rights reserved.
//

#import "NSUserDefaults+SDExtension.h"

@implementation NSUserDefaults (SDExtension)

- (void)saveString:(NSString *)str withKey:(NSString *)key{
    
    [[NSUserDefaults standardUserDefaults] setObject:str forKey:key];
    [[NSUserDefaults standardUserDefaults] synchronize];
}

- (NSString *)getValueForKEy:(NSString *)key{
    return [[NSUserDefaults standardUserDefaults] objectForKey:key];
}

- (void)saveBool:(BOOL)boo withKey:(NSString *)key{
    [[NSUserDefaults standardUserDefaults] setBool:boo forKey:key];
    [[NSUserDefaults standardUserDefaults] synchronize];
}
- (BOOL)getBoolForkey:(NSString *)key{
    
   return [[NSUserDefaults standardUserDefaults] boolForKey:key];
}
@end
